<?php
define( '_VALID_MOS', 1 );
require( '../globals.php' );
require( '../configuration.php' );
require_once( '../includes/joomla.php' );
require_once( '../includes/sef.php' );
require_once( '../language/english.php' );

$id		= intval(mosGetParam($_REQUEST, 'id', 0));

$sql = "SELECT id,catid,title_alias,img,img2,introtext FROM #__content WHERE id=".$id;
$database->setQuery($sql);
$database->loadObject($showImage);

$url = $mosConfig_live_site."/administrator/components/com_content/uploads/";
$link = sefRelToAbs("index.php?option=com_content&task=view&catid=".$showImage->catid."&id=".$showImage->id).$showImage->title_alias.".html";
if ($showImage->img2!=''){
	?>
	<a href="<?php echo $link;?>"><img src="<?php echo $url.$showImage->img2;?>" /></a>
	<?php
}else if ($showImage->img!=''){
	?>
	<a href="<?php echo $link;?>"><img src="<?php echo $url.$showImage->img;?>" /></a>
	<?php
}else{
	?>
	<div class="showTextSpecial"><?php echo $showImage->introtext;?></div>
	<?php
}

?>